
class Student{
    private String name;
    private int grade;

    public Student(){

    }
    public Student(String name,int grade){
        this.name=name;
        this.grade=grade;
    }
    public void setName(String name){
        this.name=name;
    }


    public String getName(){
        return this.name;
    }
    public void setGrade(int grade){
        this.grade=grade;
    }
    public int getGrade(){
        return this.grade;
    }

    public void speak(){
        System.out.println(this.name+" "+this.grade);
    }
}

public class Test {
    public static void main(String[] args){
        Student student1 = new Student();
        student1.setName("张三");
        student1.setGrade(10);
        Student student2 = new Student("王五",12);
        student1.speak();
        student2.speak();
    }

}
